<template>
	<div>
		<el-dialog title="查看详情" width="800px" @open="open" class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
      <el-table :data="dataList" height="calc(200vh - 250px)">
        <el-table-column label="No." width="60" align="right" type="index"></el-table-column>
        <el-table-column label="追溯码" width="200" prop="trayNum"></el-table-column>
        <el-table-column label="员工编号" width="120" prop="userId"></el-table-column>
        <el-table-column label="任务单号" width="120" prop="taskBillNo"></el-table-column>
        <el-table-column label="是否启用" width="120" prop="enable">
          <template slot-scope="scope">
            <el-tag :type="scope.row.enable === true? '': (scope.row.enable === true? 'success': 'info')">{{ scope.row.enable === true ? '已启用': '未启用' }}</el-tag>
          </template>
        </el-table-column>

      </el-table>
		</el-dialog>
	</div>
</template>
<script>
import { detail  } from '@/api/app/scancode'
export default {
	name:'scancodedetail',
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			dataList:[],
		}
	},
	watch:{
		show(val){
			if(val){
			}
		}
	},
	methods: {
		open(){
			detail(this.info).then(res => {
				this.dataList = res.data.dataList
			})
		},
		closeForm(){
			this.$emit('update:show', false)
		}
	}
}
</script>
<style  lang="scss">
@import '@/assets/scss/common.scss'
</style>
